﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using　DPS.Prototype.Model;

namespace DPS.Prototype.PolicyBase
{
    internal class WorkOrderPool
    {
        private static List<WorkOrder> _workOrderList;
        static WorkOrderPool()
        {
            _workOrderList = new List<WorkOrder>();
            InitializePool();
        }

        private static void InitializePool()
        {
            WorkOrderPool._workOrderList = Factory.WorkOrderProviderFactory.CreateWorkOrderProvider().GetAllOpenWorkOrder();
            WorkOrderPool._workOrderList.OrderBy(wo => wo.GIDate).OrderBy(wo => wo.CreateDate).OrderBy(wo => (int)wo.Region);
        }

        public static List<WorkOrder> WorkOrderList
        {
            get
            {
                return WorkOrderPool._workOrderList;
            }
        }
    }
}
